package com.meituan.web;

import com.meituan.bo.UserBo;
import com.meituan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by lizhenxing on 2017/3/15.
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

    @Autowired
    private UserService userService;


    @RequestMapping(method = RequestMethod.POST)
    public Object saveUser(@RequestBody UserBo userBo){
        userService.addUser(userBo);
        return ResponseEntity.ok().build();
    }
}
